package com.rightsidetech.mall.service;

import com.github.pagehelper.PageInfo;
import com.rightsidetech.commom.base.ResponseData;
import com.rightsidetech.mall.dto.request.gift.GiftPageReq;
import com.rightsidetech.mall.dto.request.gift.SaveGiftReq;
import com.rightsidetech.mall.dto.request.gift.UpdateGiftReq;
import com.rightsidetech.mall.dto.response.gift.ActGiftCommodityResp;
import com.rightsidetech.mall.dto.response.gift.GiftDetailResp;
import com.rightsidetech.mall.dto.response.gift.GiftPageResp;
import com.rightsidetech.mall.entity.MallBrand;
import com.rightsidetech.mall.entity.MallGiftCommodity;
import com.rightsidetech.mall.entity.MallType;

import java.util.List;

public interface MallGiftCommodityService {

    ResponseData saveGift(SaveGiftReq req,String createrName,Long createrId);

    ResponseData<PageInfo<GiftPageResp>> page(GiftPageReq req);

    ResponseData update(UpdateGiftReq req,String updaterName,Long updaterId);

    ResponseData<GiftDetailResp> detail(Long id);

    ActGiftCommodityResp selectActGiftById(Long id);

    List<MallGiftCommodity> selectByIds(List<Long> ids);

    /**
     * @param id 换购商品id
     * @return 换购商品分类id
     */
    MallGiftCommodity selectTypeIdByGiftId(Long id);

    /**
     * 根据品牌id查询品牌名称
     * @param brandId
     * @return
     */
    MallBrand findByBrandName(Long brandId);

    /**
     * 根据分类id查询分类名称
     * @param typeId
     * @return
     */
    MallType findByTypeName(Long typeId);
}
